diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index b61d219..2b7f22c 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -14,77 +14,48 @@
 
 #include "spi_flash_internal.h"
 
-int spi_flash_cmd(struct spi_slave *spi, u8 cmd, void *response, size_t len)
+static int spi_flash_read_write(struct spi_slave *spi,
+				const u8 *cmd, size_t cmd_len,
+				const u8 *data_out, u8 *data_in,
+				size_t data_len)
 {
 	unsigned long flags = SPI_XFER_BEGIN;
 	int ret;
 
-	if (len == 0)
+	if (data_len == 0)
 		flags |= SPI_XFER_END;
 
-	ret = spi_xfer(spi, 8, &cmd, NULL, flags);
+	ret = spi_xfer(spi, cmd_len * 8, cmd, NULL, flags);
 	if (ret) {
-		debug("SF: Failed to send command %02x: %d\n", cmd, ret);
-		return ret;
-	}
-
-	if (len) {
-		ret = spi_xfer(spi, len * 8, NULL, response, SPI_XFER_END);
+		debug("SF: Failed to send command (%zu bytes): %d\n",
+				cmd_len, ret);
+	} else if (data_len != 0) {
+		ret = spi_xfer(spi, data_len * 8, data_out, data_in, SPI_XFER_END);
 		if (ret)
-			debug("SF: Failed to read response (%zu bytes): %d\n",
-					len, ret);
+			debug("SF: Failed to transfer %zu bytes of data: %d\n",
+					data_len, ret);
 	}
 
 	return ret;
 }
 
+int spi_flash_cmd(struct spi_slave *spi, u8 cmd, void *response, size_t len)
+{
+	return spi_flash_cmd_read(spi, &cmd, 1, response, len);
+}
+
 int spi_flash_cmd_read(struct spi_slave *spi, const u8 *cmd,
 		size_t cmd_len, void *data, size_t data_len)
 {
-	unsigned long flags = SPI_XFER_BEGIN;
-	int ret;
-
-	if (data_len == 0)
-		flags |= SPI_XFER_END;
-
-	ret = spi_xfer(spi, cmd_len * 8, cmd, NULL, flags);
-	if (ret) {
-		debug("SF: Failed to send read command (%zu bytes): %d\n",
-				cmd_len, ret);
-	} else if (data_len != 0) {
-		ret = spi_xfer(spi, data_len * 8, NULL, data, SPI_XFER_END);
-		if (ret)
-			debug("SF: Failed to read %zu bytes of data: %d\n",
-					data_len, ret);
-	}
-
-	return ret;
+	return spi_flash_read_write(spi, cmd, cmd_len, NULL, data, data_len);
 }
 
 int spi_flash_cmd_write(struct spi_slave *spi, const u8 *cmd, size_t cmd_len,
 		const void *data, size_t data_len)
 {
-	unsigned long flags = SPI_XFER_BEGIN;
-	int ret;
-
-	if (data_len == 0)
-		flags |= SPI_XFER_END;
-
-	ret = spi_xfer(spi, cmd_len * 8, cmd, NULL, flags);
-	if (ret) {
-		debug("SF: Failed to send read command (%zu bytes): %d\n",
-				cmd_len, ret);
-	} else if (data_len != 0) {
-		ret = spi_xfer(spi, data_len * 8, data, NULL, SPI_XFER_END);
-		if (ret)
-			debug("SF: Failed to read %zu bytes of data: %d\n",
-					data_len, ret);
-	}
-
-	return ret;
+	return spi_flash_read_write(spi, cmd, cmd_len, data, NULL, data_len);
 }
 
-
 int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,
 		size_t cmd_len, void *data, size_t data_len)
 {
